Skip to content

feat!: Acir call opcode#4773

Merged
TomAFrench merged 61 commits into
masterfrom
mv/acir-call-opcode
Mar 18, 2024
Merged

feat!: Acir call opcode#4773
TomAFrench merged 61 commits into
masterfrom
mv/acir-call-opcode

Conversation

@vezenovm

Copy link
Copy Markdown
Contributor

Resolves noir-lang/noir#4427

This PR just introduces the Call opcode to cleanly separate the breaking serialization change from its implementation. There will be followup work as specified under noir-lang/noir#4426 for implementing this opcode.

I ultimately settled on just having three fields for the opcode.

  1. We just need an ID which acts as a function pointer that the execution environment will use for setting up the circuit that gets passed to the backend.
  2. Inputs/Outputs just need to be witnesses as they should be treated the same way we treat inputs and outputs from any entry point function
  3. I did not add a field for including metadata as I don't see the need. There is only two things a backend can really do with a function call. Either inline the function or fold the function. If a backend has the ability to fold is there a case where it would chose not to fold a function and would rather inline the function call? If we feel this is too restrictive I can add a metadata field. However, any metadata field should be an enum so any need to attach metadata to a function call would still require a breaking change.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ACIR: Call opcode

5 participants